<%-- internal/switchboard/index.jsp --%>

<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="problemDomain.EmployeeAccountBean, problemDomain.EmployeeAccountBean.Position" %>  

<%
	//get the currently logged on employee from session
	EmployeeAccountBean employee = (EmployeeAccountBean)session.getAttribute("employee");
	EmployeeAccountBean.Position pos = null;
	if (employee != null)
		pos = employee.getPosition();
	else {
		response.sendRedirect("../login/");
		return;
	}
	
	if(pos == Position.DRIVER) {
		response.sendRedirect("../view/delivery");
		return;
	}
%>    
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link type="text/css" rel="stylesheet" href="../css/framed.css" />
	<link type="text/css" rel="stylesheet" href="../css/general.css" />
	<link type="text/css" rel="stylesheet" href="../css/switchboard.css" />
	<script type="text/javascript">
		function goTo (url) {
			window.location.href = url;
		}
	</script>
	<title>ORDRS - Administration</title>
</head>
<body>
	<div style="left: 6%;">
			<img src="../images/logo.bmp" />
	</div>
	<!-- Logout -->
		<div class="logout">
			<table class="navi" align="right">
				<tr>
					<td class="navi"><a href="../login/">Logout</a></td>
				</tr>
			</table>
		</div>
		<!-- END Logout -->
	<fieldset class="buttons" style="margin: 5%; margin-top: 25px; height: 60%;  width: 50em; padding: 15px; border: 2px solid black;">
		<legend style="font-size: 32px;">Administration</legend>
		<table class="buttons" style="border: 0px; width: 100%;">
			<tr>
				<td onclick="goTo('../maintain/delivery')">Maintain<br/>Delivery</td>
				<td onclick="goTo('../maintain/order')">Maintain<br/>Order</td>
				<td onclick="goTo('../maintain/menu')">Maintain<br/>Menu</td>
				<td onclick="goTo('../maintain/menu-item')">Maintain<br/>Menu Item</td>
				<td onclick="goTo('../maintain/reservation')">Maintain<br/>Reservation</td>
			</tr>
			<tr>
				<td onclick="goTo('../maintain/employee')">Maintain<br/>Employee</td>
				<td onclick="goTo('../maintain/patron')">Maintain<br/>Patron</td>
				<td onclick="goTo('../maintain/food-item')">Maintain<br/>Food Item</td>
				<td onclick="goTo('../view/report')">Reports</td>
			</tr>
		</table>
	</fieldset>
</body>
</html>